import request from '@/utils/request'

export function getAccount(params) {
  return request({
    url: '/api/user/list',
    method: 'get',
    params
  })
}
export function updateAccount(data) {
  return request({
    url: '/api/user/update',
    method: 'post',
    data
  })
}
export function deleteAccount(data) {
  return request({
    url: '/api/user/delete',
    method: 'post',
    data
  })
}
export function updatePassword(data) {
  return request({
    url: '/api/user/modify-password',
    method: 'post',
    data
  })
}
export function createAccount(data) {
  return request({
    url: '/api/user/create',
    method: 'post',
    data
  })
}
export function getRoleList(params) {
  return request({
    url: '/api/user/role-list',
    method: 'get',
    params
  })
}
export function getDistrictList(params) {
  return request({
    url: '/api/district/list',
    method: 'get',
    params
  })
}
export function getDictionary(params) {
  return request({
    url: '/api/dict/list',
    method: 'get',
    params
  })
}
export function createDictionary(data) {
  return request({
    url: '/api/dict/create',
    method: 'post',
    data
  })
}
export function updateDictionary(data) {
  return request({
    url: '/api/dict/update',
    method: 'post',
    data
  })
}
export function getDictionaryDetail(params) {
  return request({
    url: '/api/dict/show',
    method: 'get',
    params
  })
}
export function getDictCategory(params) {
  return request({
    url: '/api/dict/category-list',
    method: 'get',
    params
  })
}
export function deleteDictionary(data) {
  return request({
    url: '/api/dict/delete',
    method: 'post',
    data
  })
}
